﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Forum.Web.BaseCode
{
    public sealed class WebCookie
    {
        private static System.Web.HttpContext Current
        {
            get
            {
                return System.Web.HttpContext.Current;
            }
        }

    

        public static string MemberLoginName
        {
            get
            {
                return (Current.Request.Cookies["MemberLoginName"] == null) ? null : Current.Server.UrlDecode(Current.Request.Cookies["MemberLoginName"].Value);
            }
            set
            {
                HttpCookie cookie = new HttpCookie("MemberLoginName", Current.Server.UrlEncode(value));               
                Current.Response.Cookies.Add(cookie);
            }
        }
    }
}